home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / compile_to_c10.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  25.0 KB  |  885 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_c.h"
  9. T0* r382item(T382* C,int a1){
  10. T0* R=NULL;
  11. R=((((T382*)C))->_storage/*0*/)[(a1)-((((T382*)C))->_lower/*12*/)];
  12. return R;
  13. }
  14. /*No:ARRAY[DECLARATION].storage*/
  15. /*No:ARRAY[DECLARATION].capacity*/
  16. /*No:ARRAY[DECLARATION].lower*/
  17. /*No:ARRAY[DECLARATION].put*/
  18. /*No:ARRAY[DECLARATION].upper*/
  19. int r382count(T382* C){
  20. int R=0;
  21. R=(((((T382*)C))->_upper/*8*/)-((((T382*)C))->_lower/*12*/))+(1);
  22. return R;
  23. }
  24. void r382add_last(T382* C,T0* a1){
  25. int _new_capacity=0;
  26. /*IF*/if (((((T382*)C))->_capacity/*4*/)<((r382count(C))+(1))) {
  27. /*IF*/if (((((T382*)C))->_capacity/*4*/)==(0)) {
  28. C->_capacity=16;
  29. C->_storage=calloc((((T382*)C))->_capacity/*4*/,sizeof(T0*));
  30. }
  31. else {
  32. _new_capacity=(2)*((((T382*)C))->_capacity/*4*/);
  33. C->_storage=r667realloc((((T382*)C))->_storage/*0*/,(((T382*)C))->_capacity/*4*/,_new_capacity);
  34. C->_capacity=_new_capacity;
  35. }
  36. /*FI*/}
  37. /*FI*/C->_upper=((((T382*)C))->_upper/*8*/)+(1);
  38. /*[IRF3.6put*/{T382* C1=C;
  39. T0* b1=a1;
  40. int b2=(((T382*)C))->_upper/*8*/;
  41. ((((T382*)C1))->_storage/*0*/)[(b2)-((((T382*)C1))->_lower/*12*/)]=(b1);
  42. }/*]*/
  43. }
  44. /*No:ARRAY[BOOLEAN].clear_all*/
  45. /*No:ARRAY[BOOLEAN].set_all_with*/
  46. void r353force(T353* C,int a1,int a2){
  47. /*IF*/if (((((T353*)C))->_upper/*8*/)<(a2)) {
  48. r353resize(C,(((T353*)C))->_lower/*12*/,a2);
  49. }
  50.  else if ((a2)<((((T353*)C))->_lower/*12*/)) {
  51. r353resize(C,a2,(((T353*)C))->_upper/*8*/);
  52. }
  53. /*FI*//*[IRF3.6put*/{T353* C1=C;
  54. int b1=a1;
  55. int b2=a2;
  56. ((((T353*)C1))->_storage/*0*/)[(b2)-((((T353*)C1))->_lower/*12*/)]=(b1);
  57. }/*]*/
  58. }
  59. void r353make(T353* C,int a1,int a2){
  60. int _needed=0;
  61. C->_lower=a1;
  62. C->_upper=a2;
  63. _needed=((a2)-(a1))+(1);
  64. /*IF*/if ((_needed)>(0)) {
  65. /*IF*/if (((((T353*)C))->_capacity/*4*/)<(_needed)) {
  66. /*IF*/if (((((T353*)C))->_capacity/*4*/)==(0)) {
  67. C->_storage=calloc(_needed,sizeof(int));
  68. }
  69. else {
  70. C->_storage=calloc(_needed,sizeof(int));
  71. }
  72. /*FI*/C->_capacity=_needed;
  73. }
  74. else {
  75. /*[IRF3.6clear_all*/{T353* C1=C;
  76. int __value=0;
  77. /*[IRF3.6set_all_with*/{T353* C2=C1;
  78. int c1=__value;
  79. r541set_all_with((((T353*)C2))->_storage/*0*/,c1,((((T353*)C2))->_upper/*8*/)-((((T353*)C2))->_lower/*12*/));
  80. }/*]*/
  81. }/*]*/
  82. }
  83. /*FI*/}
  84. /*FI*/}
  85. int r353item(T353* C,int a1){
  86. int R=0;
  87. R=((((T353*)C))->_storage/*0*/)[(a1)-((((T353*)C))->_lower/*12*/)];
  88. return R;
  89. }
  90. void r353resize(T353* C,int a1,int a2){
  91. int _mem=0;
  92. int _up=0;
  93. int _i=0;
  94. T0* _other=NULL;
  95. {T353*n=malloc(sizeof(*n));
  96. *n=M353;
  97. r353make(n,a1,a2);
  98. _other=(T0*)n;
  99. }
  100. _i=r2max((((T353*)C))->_lower/*12*/,(((T353*)((T353*)_other)))->_lower/*12*/);
  101. _up=r2min((((T353*)C))->_upper/*8*/,(((T353*)((T353*)_other)))->_upper/*8*/);
  102. while (!((_i)>(_up))) {
  103. /*[IRF3.6put*/{T353* C1=((T353*)_other);
  104. int b1=r353item(C,_i);
  105. int b2=_i;
  106. ((((T353*)C1))->_storage/*0*/)[(b2)-((((T353*)C1))->_lower/*12*/)]=(b1);
  107. }/*]*/
  108. _i=(_i)+(1);
  109. }
  110. *((T353*)(C))=*((T353*)(_other));
  111. }
  112. /*No:ARRAY[BOOLEAN].storage*/
  113. /*No:ARRAY[BOOLEAN].capacity*/
  114. /*No:ARRAY[BOOLEAN].lower*/
  115. /*No:ARRAY[BOOLEAN].put*/
  116. /*No:ARRAY[BOOLEAN].upper*/
  117. int r353valid_index(T353* C,int a1){
  118. int R=0;
  119. R=(((((T353*)C))->_lower/*12*/)<=(a1))&&((a1)<=((((T353*)C))->_upper/*8*/));
  120. return R;
  121. }
  122. void r353set_slice_with(T353* C,int a1,int a2,int a3){
  123. int _i=0;
  124. _i=a2;
  125. while (!((_i)>(a3))) {
  126. /*[IRF3.6put*/{T353* C1=C;
  127. int b1=a1;
  128. int b2=_i;
  129. ((((T353*)C1))->_storage/*0*/)[(b2)-((((T353*)C1))->_lower/*12*/)]=(b1);
  130. }/*]*/
  131. _i=(_i)+(1);
  132. }
  133. }
  134. /*No:FIXED_ARRAY[MANIFEST_STRING].clear_all*/
  135. /*No:FIXED_ARRAY[MANIFEST_STRING].set_all_with*/
  136. void r256make(T256* C,int a1){
  137. /*IF*/if ((a1)==(0)) {
  138. C->_upper=-(1);
  139. }
  140.  else if (((((T256*)C))->_capacity/*8*/)==(0)) {
  141. C->_storage=calloc(a1,sizeof(T0*));
  142. C->_capacity=a1;
  143. C->_upper=(a1)-(1);
  144. }
  145.  else if (((((T256*)C))->_capacity/*8*/)<(a1)) {
  146. C->_storage=calloc(a1,sizeof(T0*));
  147. C->_capacity=a1;
  148. C->_upper=(a1)-(1);
  149. }
  150. else {
  151. C->_upper=(a1)-(1);
  152. /*[IRF3.6clear_all*/{T256* C1=C;
  153. T0* __value=NULL;
  154. /*[IRF3.6set_all_with*/{T256* C2=C1;
  155. T0* c1=__value;
  156. r729set_all_with((((T256*)C2))->_storage/*4*/,c1,(((T256*)C2))->_upper/*12*/);
  157. }/*]*/
  158. }/*]*/
  159. }
  160. /*FI*/}
  161. int r256fast_has(T256* C,T0* a1){
  162. int R=0;
  163. /*IF*/if ((/*(IRF4.6count*/((((T256*)C))->_upper/*12*/)+(1)/*)*/)>(0)) {
  164. R=(r256fast_index_of(C,a1))<=((((T256*)C))->_upper/*12*/);
  165. }
  166. /*FI*/return R;
  167. }
  168. /*No:FIXED_ARRAY[MANIFEST_STRING].item*/
  169. void r256resize(T256* C,int a1){
  170. T0* _elt_default=NULL;
  171. int _i=0;
  172. int _new_capacity=0;
  173. /*IF*/if ((a1)<=(/*(IRF4.6count*/((((T256*)C))->_upper/*12*/)+(1)/*)*/)) {
  174. C->_upper=(a1)-(1);
  175. }
  176. else {
  177. _new_capacity=a1;
  178. /*IF*/if (((((T256*)C))->_capacity/*8*/)<(_new_capacity)) {
  179. /*IF*/if (((((T256*)C))->_capacity/*8*/)==(0)) {
  180. C->_storage=calloc(_new_capacity,sizeof(T0*));
  181. }
  182. else {
  183. C->_storage=r729realloc((((T256*)C))->_storage/*4*/,(((T256*)C))->_capacity/*8*/,_new_capacity);
  184. }
  185. /*FI*/C->_capacity=_new_capacity;
  186. }
  187. /*FI*/_new_capacity=(((T256*)C))->_upper/*12*/;
  188. C->_upper=(a1)-(1);
  189. _i=(((T256*)C))->_upper/*12*/;
  190. while (!((_i)==(_new_capacity))) {
  191. /*[IRF3.5put*/((((T256*)C))->_storage/*4*/)[_i]=(_elt_default);
  192. /*]*/
  193. _i=(_i)-(1);
  194. }
  195. }
  196. /*FI*/}
  197. /*No:FIXED_ARRAY[MANIFEST_STRING].storage*/
  198. /*No:FIXED_ARRAY[MANIFEST_STRING].capacity*/
  199. int r256has(T256* C,T0* a1){
  200. int R=0;
  201. /*IF*/if ((/*(IRF4.6count*/((((T256*)C))->_upper/*12*/)+(1)/*)*/)>(0)) {
  202. R=(r256index_of(C,a1))<=((((T256*)C))->_upper/*12*/);
  203. }
  204. /*FI*/return R;
  205. }
  206. void r256with_capacity(T256* C,int a1){
  207. /*IF*/if (((((T256*)C))->_capacity/*8*/)<(a1)) {
  208. C->_storage=calloc(a1,sizeof(T0*));
  209. C->_capacity=a1;
  210. }
  211. /*FI*/C->_upper=-(1);
  212. }
  213. int r256fast_index_of(T256* C,T0* a1){
  214. int R=0;
  215. R=r729fast_index_of((((T256*)C))->_storage/*4*/,a1,(((T256*)C))->_upper/*12*/);
  216. return R;
  217. }
  218. /*No:FIXED_ARRAY[MANIFEST_STRING].put*/
  219. /*No:FIXED_ARRAY[MANIFEST_STRING].upper*/
  220. void r256add_last(T256* C,T0* a1){
  221. int _new_capacity=0;
  222. /*IF*/if ((((((T256*)C))->_upper/*12*/)+(1))<=(((((T256*)C))->_capacity/*8*/)-(1))) {
  223. C->_upper=((((T256*)C))->_upper/*12*/)+(1);
  224. }
  225.  else if (((((T256*)C))->_capacity/*8*/)==(0)) {
  226. C->_storage=calloc(2,sizeof(T0*));
  227. C->_capacity=2;
  228. C->_upper=0;
  229. }
  230. else {
  231. _new_capacity=(2)*((((T256*)C))->_capacity/*8*/);
  232. C->_storage=r729realloc((((T256*)C))->_storage/*4*/,(((T256*)C))->_capacity/*8*/,_new_capacity);
  233. C->_capacity=_new_capacity;
  234. C->_upper=((((T256*)C))->_upper/*12*/)+(1);
  235. }
  236. /*FI*//*[IRF3.5put*/((((T256*)C))->_storage/*4*/)[(((T256*)C))->_upper/*12*/]=(a1);
  237. /*]*/
  238. }
  239. /*No:FIXED_ARRAY[MANIFEST_STRING].count*/
  240. int r256index_of(T256* C,T0* a1){
  241. int R=0;
  242. R=r729index_of((((T256*)C))->_storage/*4*/,a1,(((T256*)C))->_upper/*12*/);
  243. return R;
  244. }
  245. int r187fast_has(T187* C,T0* a1){
  246. int R=0;
  247. /*IF*/if ((/*(IRF4.6count*/((((T187*)C))->_upper/*8*/)+(1)/*)*/)>(0)) {
  248. R=(r187fast_index_of(C,a1))<=((((T187*)C))->_upper/*8*/);
  249. }
  250. /*FI*/return R;
  251. }
  252. /*No:FIXED_ARRAY[RUN_CLASS].item*/
  253. /*No:FIXED_ARRAY[RUN_CLASS].storage*/
  254. /*No:FIXED_ARRAY[RUN_CLASS].capacity*/
  255. void r187with_capacity(T187* C,int a1){
  256. /*IF*/if (((((T187*)C))->_capacity/*4*/)<(a1)) {
  257. C->_storage=calloc(a1,sizeof(T0*));
  258. C->_capacity=a1;
  259. }
  260. /*FI*/C->_upper=-(1);
  261. }
  262. int r187fast_index_of(T187* C,T0* a1){
  263. int R=0;
  264. R=r659fast_index_of((((T187*)C))->_storage/*0*/,a1,(((T187*)C))->_upper/*8*/);
  265. return R;
  266. }
  267. /*No:FIXED_ARRAY[RUN_CLASS].put*/
  268. /*No:FIXED_ARRAY[RUN_CLASS].upper*/
  269. void r187add_last(T187* C,T0* a1){
  270. int _new_capacity=0;
  271. /*IF*/if ((((((T187*)C))->_upper/*8*/)+(1))<=(((((T187*)C))->_capacity/*4*/)-(1))) {
  272. C->_upper=((((T187*)C))->_upper/*8*/)+(1);
  273. }
  274.  else if (((((T187*)C))->_capacity/*4*/)==(0)) {
  275. C->_storage=calloc(2,sizeof(T0*));
  276. C->_capacity=2;
  277. C->_upper=0;
  278. }
  279. else {
  280. _new_capacity=(2)*((((T187*)C))->_capacity/*4*/);
  281. C->_storage=r659realloc((((T187*)C))->_storage/*0*/,(((T187*)C))->_capacity/*4*/,_new_capacity);
  282. C->_capacity=_new_capacity;
  283. C->_upper=((((T187*)C))->_upper/*8*/)+(1);
  284. }
  285. /*FI*//*[IRF3.5put*/((((T187*)C))->_storage/*0*/)[(((T187*)C))->_upper/*8*/]=(a1);
  286. /*]*/
  287. }
  288. /*No:FIXED_ARRAY[RUN_CLASS].count*/
  289. T0* r419item(T419* C,int a1){
  290. T0* R=NULL;
  291. R=((((T419*)C))->_storage/*0*/)[(a1)-((((T419*)C))->_lower/*12*/)];
  292. return R;
  293. }
  294. /*No:ARRAY[INSTRUCTION].storage*/
  295. T0* r419twin(T419* C){
  296. T0* R=NULL;
  297. R=malloc(sizeof(*C));
  298. *((T419*)R)=M419;
  299. r419copy(((T419*)R),((T0*)C));
  300. return R;
  301. }
  302. /*No:ARRAY[INSTRUCTION].capacity*/
  303. void r419copy(T419* C,T0* a1){
  304. int _needed_capacity=0;
  305. C->_lower=(((T419*)((T419*)a1)))->_lower/*12*/;
  306. C->_upper=(((T419*)((T419*)a1)))->_upper/*8*/;
  307. _needed_capacity=(((((T419*)C))->_upper/*8*/)-((((T419*)C))->_lower/*12*/))+(1);
  308. /*IF*/if (((((T419*)C))->_capacity/*4*/)<(_needed_capacity)) {
  309. C->_capacity=_needed_capacity;
  310. C->_storage=calloc((((T419*)C))->_capacity/*4*/,sizeof(T0*));
  311. }
  312. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  313. r705copy_from((((T419*)C))->_storage/*0*/,(((T419*)((T419*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  314. }
  315. /*FI*/}
  316. /*No:ARRAY[INSTRUCTION].lower*/
  317. /*No:ARRAY[INSTRUCTION].put*/
  318. /*No:ARRAY[INSTRUCTION].upper*/
  319. int r419count(T419* C){
  320. int R=0;
  321. R=(((((T419*)C))->_upper/*8*/)-((((T419*)C))->_lower/*12*/))+(1);
  322. return R;
  323. }
  324. void r419add_last(T419* C,T0* a1){
  325. int _new_capacity=0;
  326. /*IF*/if (((((T419*)C))->_capacity/*4*/)<((r419count(C))+(1))) {
  327. /*IF*/if (((((T419*)C))->_capacity/*4*/)==(0)) {
  328. C->_capacity=16;
  329. C->_storage=calloc((((T419*)C))->_capacity/*4*/,sizeof(T0*));
  330. }
  331. else {
  332. _new_capacity=(2)*((((T419*)C))->_capacity/*4*/);
  333. C->_storage=r705realloc((((T419*)C))->_storage/*0*/,(((T419*)C))->_capacity/*4*/,_new_capacity);
  334. C->_capacity=_new_capacity;
  335. }
  336. /*FI*/}
  337. /*FI*/C->_upper=((((T419*)C))->_upper/*8*/)+(1);
  338. /*[IRF3.6put*/{T419* C1=C;
  339. T0* b1=a1;
  340. int b2=(((T419*)C))->_upper/*8*/;
  341. ((((T419*)C1))->_storage/*0*/)[(b2)-((((T419*)C1))->_lower/*12*/)]=(b1);
  342. }/*]*/
  343. }
  344. T0* r419first(T419* C){
  345. T0* R=NULL;
  346. R=r419item(C,(((T419*)C))->_lower/*12*/);
  347. return R;
  348. }
  349. T0* r901item(T901* C,int a1){
  350. T0* R=NULL;
  351. R=((((T901*)C))->_storage/*0*/)[(a1)-((((T901*)C))->_lower/*12*/)];
  352. return R;
  353. }
  354. /*No:ARRAY[CLASS_NAME].storage*/
  355. T0* r901twin(T901* C){
  356. T0* R=NULL;
  357. R=malloc(sizeof(*C));
  358. *((T901*)R)=M901;
  359. r901copy(((T901*)R),((T0*)C));
  360. return R;
  361. }
  362. /*No:ARRAY[CLASS_NAME].capacity*/
  363. void r901copy(T901* C,T0* a1){
  364. int _needed_capacity=0;
  365. C->_lower=(((T901*)((T901*)a1)))->_lower/*12*/;
  366. C->_upper=(((T901*)((T901*)a1)))->_upper/*8*/;
  367. _needed_capacity=(((((T901*)C))->_upper/*8*/)-((((T901*)C))->_lower/*12*/))+(1);
  368. /*IF*/if (((((T901*)C))->_capacity/*4*/)<(_needed_capacity)) {
  369. C->_capacity=_needed_capacity;
  370. C->_storage=calloc((((T901*)C))->_capacity/*4*/,sizeof(T0*));
  371. }
  372. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  373. r221copy_from((((T901*)C))->_storage/*0*/,(((T901*)((T901*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  374. }
  375. /*FI*/}
  376. /*No:ARRAY[CLASS_NAME].lower*/
  377. /*No:ARRAY[CLASS_NAME].put*/
  378. /*No:ARRAY[CLASS_NAME].upper*/
  379. int r901count(T901* C){
  380. int R=0;
  381. R=(((((T901*)C))->_upper/*8*/)-((((T901*)C))->_lower/*12*/))+(1);
  382. return R;
  383. }
  384. void r901add_last(T901* C,T0* a1){
  385. int _new_capacity=0;
  386. /*IF*/if (((((T901*)C))->_capacity/*4*/)<((r901count(C))+(1))) {
  387. /*IF*/if (((((T901*)C))->_capacity/*4*/)==(0)) {
  388. C->_capacity=16;
  389. C->_storage=calloc((((T901*)C))->_capacity/*4*/,sizeof(T0*));
  390. }
  391. else {
  392. _new_capacity=(2)*((((T901*)C))->_capacity/*4*/);
  393. C->_storage=r221realloc((((T901*)C))->_storage/*0*/,(((T901*)C))->_capacity/*4*/,_new_capacity);
  394. C->_capacity=_new_capacity;
  395. }
  396. /*FI*/}
  397. /*FI*/C->_upper=((((T901*)C))->_upper/*8*/)+(1);
  398. /*[IRF3.6put*/{T901* C1=C;
  399. T0* b1=a1;
  400. int b2=(((T901*)C))->_upper/*8*/;
  401. ((((T901*)C1))->_storage/*0*/)[(b2)-((((T901*)C1))->_lower/*12*/)]=(b1);
  402. }/*]*/
  403. }
  404. /*No:FIXED_ARRAY[STRING].clear_all*/
  405. /*No:FIXED_ARRAY[STRING].set_all_with*/
  406. void r927make(T927* C,int a1){
  407. /*IF*/if ((a1)==(0)) {
  408. C->_upper=-(1);
  409. }
  410.  else if (((((T927*)C))->_capacity/*4*/)==(0)) {
  411. C->_storage=calloc(a1,sizeof(T0*));
  412. C->_capacity=a1;
  413. C->_upper=(a1)-(1);
  414. }
  415.  else if (((((T927*)C))->_capacity/*4*/)<(a1)) {
  416. C->_storage=calloc(a1,sizeof(T0*));
  417. C->_capacity=a1;
  418. C->_upper=(a1)-(1);
  419. }
  420. else {
  421. C->_upper=(a1)-(1);
  422. /*[IRF3.6clear_all*/{T927* C1=C;
  423. T0* __value=NULL;
  424. /*[IRF3.6set_all_with*/{T927* C2=C1;
  425. T0* c1=__value;
  426. r400set_all_with((((T927*)C2))->_storage/*0*/,c1,(((T927*)C2))->_upper/*8*/);
  427. }/*]*/
  428. }/*]*/
  429. }
  430. /*FI*/}
  431. int r927fast_has(T927* C,T0* a1){
  432. int R=0;
  433. /*IF*/if ((/*(IRF4.6count*/((((T927*)C))->_upper/*8*/)+(1)/*)*/)>(0)) {
  434. R=(r927fast_index_of(C,a1))<=((((T927*)C))->_upper/*8*/);
  435. }
  436. /*FI*/return R;
  437. }
  438. /*No:FIXED_ARRAY[STRING].item*/
  439. /*No:FIXED_ARRAY[STRING].storage*/
  440. /*No:FIXED_ARRAY[STRING].capacity*/
  441. void r927with_capacity(T927* C,int a1){
  442. /*IF*/if (((((T927*)C))->_capacity/*4*/)<(a1)) {
  443. C->_storage=calloc(a1,sizeof(T0*));
  444. C->_capacity=a1;
  445. }
  446. /*FI*/C->_upper=-(1);
  447. }
  448. int r927fast_index_of(T927* C,T0* a1){
  449. int R=0;
  450. R=r400fast_index_of((((T927*)C))->_storage/*0*/,a1,(((T927*)C))->_upper/*8*/);
  451. return R;
  452. }
  453. /*No:FIXED_ARRAY[STRING].put*/
  454. /*No:FIXED_ARRAY[STRING].upper*/
  455. /*No:FIXED_ARRAY[STRING].count*/
  456. void r927add_last(T927* C,T0* a1){
  457. int _new_capacity=0;
  458. /*IF*/if ((((((T927*)C))->_upper/*8*/)+(1))<=(((((T927*)C))->_capacity/*4*/)-(1))) {
  459. C->_upper=((((T927*)C))->_upper/*8*/)+(1);
  460. }
  461.  else if (((((T927*)C))->_capacity/*4*/)==(0)) {
  462. C->_storage=calloc(2,sizeof(T0*));
  463. C->_capacity=2;
  464. C->_upper=0;
  465. }
  466. else {
  467. _new_capacity=(2)*((((T927*)C))->_capacity/*4*/);
  468. C->_storage=r400realloc((((T927*)C))->_storage/*0*/,(((T927*)C))->_capacity/*4*/,_new_capacity);
  469. C->_capacity=_new_capacity;
  470. C->_upper=((((T927*)C))->_upper/*8*/)+(1);
  471. }
  472. /*FI*//*[IRF3.5put*/((((T927*)C))->_storage/*0*/)[(((T927*)C))->_upper/*8*/]=(a1);
  473. /*]*/
  474. }
  475. /*No:ARRAY[RUN_CLASS].clear_all*/
  476. /*No:ARRAY[RUN_CLASS].set_all_with*/
  477. int r396empty(T396* C){
  478. int R=0;
  479. R=(r396count(C))==(0);
  480. return R;
  481. }
  482. void r396make(T396* C,int a1,int a2){
  483. int _needed=0;
  484. C->_lower=a1;
  485. C->_upper=a2;
  486. _needed=((a2)-(a1))+(1);
  487. /*IF*/if ((_needed)>(0)) {
  488. /*IF*/if (((((T396*)C))->_capacity/*4*/)<(_needed)) {
  489. /*IF*/if (((((T396*)C))->_capacity/*4*/)==(0)) {
  490. C->_storage=calloc(_needed,sizeof(T0*));
  491. }
  492. else {
  493. C->_storage=calloc(_needed,sizeof(T0*));
  494. }
  495. /*FI*/C->_capacity=_needed;
  496. }
  497. else {
  498. /*[IRF3.6clear_all*/{T396* C1=C;
  499. T0* __value=NULL;
  500. /*[IRF3.6set_all_with*/{T396* C2=C1;
  501. T0* c1=__value;
  502. r659set_all_with((((T396*)C2))->_storage/*0*/,c1,((((T396*)C2))->_upper/*8*/)-((((T396*)C2))->_lower/*12*/));
  503. }/*]*/
  504. }/*]*/
  505. }
  506. /*FI*/}
  507. /*FI*/}
  508. int r396fast_has(T396* C,T0* a1){
  509. int R=0;
  510. /*IF*/if ((r396count(C))>(0)) {
  511. R=(r396fast_index_of(C,a1))<=((((T396*)C))->_upper/*8*/);
  512. }
  513. /*FI*/return R;
  514. }
  515. T0* r396item(T396* C,int a1){
  516. T0* R=NULL;
  517. R=((((T396*)C))->_storage/*0*/)[(a1)-((((T396*)C))->_lower/*12*/)];
  518. return R;
  519. }
  520. void r396resize(T396* C,int a1,int a2){
  521. int _mem=0;
  522. int _up=0;
  523. int _i=0;
  524. T0* _other=NULL;
  525. {T396*n=malloc(sizeof(*n));
  526. *n=M396;
  527. r396make(n,a1,a2);
  528. _other=(T0*)n;
  529. }
  530. _i=r2max((((T396*)C))->_lower/*12*/,(((T396*)((T396*)_other)))->_lower/*12*/);
  531. _up=r2min((((T396*)C))->_upper/*8*/,(((T396*)((T396*)_other)))->_upper/*8*/);
  532. while (!((_i)>(_up))) {
  533. /*[IRF3.6put*/{T396* C1=((T396*)_other);
  534. T0* b1=r396item(C,_i);
  535. int b2=_i;
  536. ((((T396*)C1))->_storage/*0*/)[(b2)-((((T396*)C1))->_lower/*12*/)]=(b1);
  537. }/*]*/
  538. _i=(_i)+(1);
  539. }
  540. *((T396*)(C))=*((T396*)(_other));
  541. }
  542. /*No:ARRAY[RUN_CLASS].storage*/
  543. void r396swap(T396* C,int a1,int a2){
  544. T0* _tmp=NULL;
  545. _tmp=r396item(C,a1);
  546. /*[IRF3.6put*/{T396* C1=C;
  547. T0* b1=r396item(C,a2);
  548. int b2=a1;
  549. ((((T396*)C1))->_storage/*0*/)[(b2)-((((T396*)C1))->_lower/*12*/)]=(b1);
  550. }/*]*/
  551. /*[IRF3.6put*/{T396* C1=C;
  552. T0* b1=_tmp;
  553. int b2=a2;
  554. ((((T396*)C1))->_storage/*0*/)[(b2)-((((T396*)C1))->_lower/*12*/)]=(b1);
  555. }/*]*/
  556. }
  557. /*No:ARRAY[RUN_CLASS].capacity*/
  558. void r396copy(T396* C,T0* a1){
  559. int _needed_capacity=0;
  560. C->_lower=(((T396*)((T396*)a1)))->_lower/*12*/;
  561. C->_upper=(((T396*)((T396*)a1)))->_upper/*8*/;
  562. _needed_capacity=(((((T396*)C))->_upper/*8*/)-((((T396*)C))->_lower/*12*/))+(1);
  563. /*IF*/if (((((T396*)C))->_capacity/*4*/)<(_needed_capacity)) {
  564. C->_capacity=_needed_capacity;
  565. C->_storage=calloc((((T396*)C))->_capacity/*4*/,sizeof(T0*));
  566. }
  567. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  568. r659copy_from((((T396*)C))->_storage/*0*/,(((T396*)((T396*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  569. }
  570. /*FI*/}
  571. /*No:ARRAY[RUN_CLASS].lower*/
  572. void r396with_capacity(T396* C,int a1,int a2){
  573. /*IF*/if (((((T396*)C))->_capacity/*4*/)<(a1)) {
  574. C->_storage=calloc(a1,sizeof(T0*));
  575. C->_capacity=a1;
  576. }
  577. /*FI*/C->_lower=a2;
  578. C->_upper=(a2)-(1);
  579. }
  580. int r396fast_index_of(T396* C,T0* a1){
  581. int R=0;
  582. R=((((T396*)C))->_lower/*12*/)+(r659fast_index_of((((T396*)C))->_storage/*0*/,a1,((((T396*)C))->_upper/*8*/)-((((T396*)C))->_lower/*12*/)));
  583. return R;
  584. }
  585. /*No:ARRAY[RUN_CLASS].put*/
  586. /*No:ARRAY[RUN_CLASS].upper*/
  587. void r396add_last(T396* C,T0* a1){
  588. int _new_capacity=0;
  589. /*IF*/if (((((T396*)C))->_capacity/*4*/)<((r396count(C))+(1))) {
  590. /*IF*/if (((((T396*)C))->_capacity/*4*/)==(0)) {
  591. C->_capacity=16;
  592. C->_storage=calloc((((T396*)C))->_capacity/*4*/,sizeof(T0*));
  593. }
  594. else {
  595. _new_capacity=(2)*((((T396*)C))->_capacity/*4*/);
  596. C->_storage=r659realloc((((T396*)C))->_storage/*0*/,(((T396*)C))->_capacity/*4*/,_new_capacity);
  597. C->_capacity=_new_capacity;
  598. }
  599. /*FI*/}
  600. /*FI*/C->_upper=((((T396*)C))->_upper/*8*/)+(1);
  601. /*[IRF3.6put*/{T396* C1=C;
  602. T0* b1=a1;
  603. int b2=(((T396*)C))->_upper/*8*/;
  604. ((((T396*)C1))->_storage/*0*/)[(b2)-((((T396*)C1))->_lower/*12*/)]=(b1);
  605. }/*]*/
  606. }
  607. int r396count(T396* C){
  608. int R=0;
  609. R=(((((T396*)C))->_upper/*8*/)-((((T396*)C))->_lower/*12*/))+(1);
  610. return R;
  611. }
  612. T0* r396first(T396* C){
  613. T0* R=NULL;
  614. R=r396item(C,(((T396*)C))->_lower/*12*/);
  615. return R;
  616. }
  617. /*No:FIXED_ARRAY[EFFECTIVE_ARG_LIST].clear_all*/
  618. /*No:FIXED_ARRAY[EFFECTIVE_ARG_LIST].set_all_with*/
  619. void r374make(T374* C,int a1){
  620. /*IF*/if ((a1)==(0)) {
  621. C->_upper=-(1);
  622. }
  623.  else if (((((T374*)C))->_capacity/*4*/)==(0)) {
  624. C->_storage=calloc(a1,sizeof(T0*));
  625. C->_capacity=a1;
  626. C->_upper=(a1)-(1);
  627. }
  628.  else if (((((T374*)C))->_capacity/*4*/)<(a1)) {
  629. C->_storage=calloc(a1,sizeof(T0*));
  630. C->_capacity=a1;
  631. C->_upper=(a1)-(1);
  632. }
  633. else {
  634. C->_upper=(a1)-(1);
  635. /*[IRF3.6clear_all*/{T374* C1=C;
  636. T0* __value=NULL;
  637. /*[IRF3.6set_all_with*/{T374* C2=C1;
  638. T0* c1=__value;
  639. r857set_all_with((((T374*)C2))->_storage/*0*/,c1,(((T374*)C2))->_upper/*8*/);
  640. }/*]*/
  641. }/*]*/
  642. }
  643. /*FI*/}
  644. /*No:FIXED_ARRAY[EFFECTIVE_ARG_LIST].item*/
  645. void r374resize(T374* C,int a1){
  646. T0* _elt_default=NULL;
  647. int _i=0;
  648. int _new_capacity=0;
  649. /*IF*/if ((a1)<=(/*(IRF4.6count*/((((T374*)C))->_upper/*8*/)+(1)/*)*/)) {
  650. C->_upper=(a1)-(1);
  651. }
  652. else {
  653. _new_capacity=a1;
  654. /*IF*/if (((((T374*)C))->_capacity/*4*/)<(_new_capacity)) {
  655. /*IF*/if (((((T374*)C))->_capacity/*4*/)==(0)) {
  656. C->_storage=calloc(_new_capacity,sizeof(T0*));
  657. }
  658. else {
  659. C->_storage=r857realloc((((T374*)C))->_storage/*0*/,(((T374*)C))->_capacity/*4*/,_new_capacity);
  660. }
  661. /*FI*/C->_capacity=_new_capacity;
  662. }
  663. /*FI*/_new_capacity=(((T374*)C))->_upper/*8*/;
  664. C->_upper=(a1)-(1);
  665. _i=(((T374*)C))->_upper/*8*/;
  666. while (!((_i)==(_new_capacity))) {
  667. /*[IRF3.5put*/((((T374*)C))->_storage/*0*/)[_i]=(_elt_default);
  668. /*]*/
  669. _i=(_i)-(1);
  670. }
  671. }
  672. /*FI*/}
  673. /*No:FIXED_ARRAY[EFFECTIVE_ARG_LIST].storage*/
  674. /*No:FIXED_ARRAY[EFFECTIVE_ARG_LIST].capacity*/
  675. /*No:FIXED_ARRAY[EFFECTIVE_ARG_LIST].put*/
  676. /*No:FIXED_ARRAY[EFFECTIVE_ARG_LIST].upper*/
  677. /*No:FIXED_ARRAY[EFFECTIVE_ARG_LIST].count*/
  678. T0* r794at(T794* C,T0* a1){
  679. T0* R=NULL;
  680. int _foo=0;
  681. _foo=r794has(C,a1);
  682. R=r52item(((T52*)((((T794*)C))->_store/*4*/)),(((T794*)C))->_has_mem/*24*/);
  683. return R;
  684. }
  685. void r794expand(T794* C){
  686. int _old_size=0;
  687. int _i=0;
  688. C->_item_mem=0;
  689. _old_size=r52count(((T52*)((((T794*)C))->_store/*4*/)));
  690. r429resize(((T429*)((((T794*)C))->_chain/*12*/)),1,(2)*(_old_size));
  691. r52resize(((T52*)((((T794*)C))->_keys/*0*/)),1,(2)*(_old_size));
  692. r52resize(((T52*)((((T794*)C))->_store/*4*/)),1,(2)*(_old_size));
  693. _i=(_old_size)+(1);
  694. while (!((_i)==(r429count(((T429*)((((T794*)C))->_chain/*12*/)))))) {
  695. /*[IRF3.6put*/{T429* C1=((T429*)((((T794*)C))->_chain/*12*/));
  696. int b1=(_i)+(1);
  697. int b2=_i;
  698. ((((T429*)C1))->_storage/*0*/)[(b2)-((((T429*)C1))->_lower/*12*/)]=(b1);
  699. }/*]*/
  700. _i=(_i)+(1);
  701. }
  702. /*[IRF3.6put*/{T429* C1=((T429*)((((T794*)C))->_chain/*12*/));
  703. int b1=(((T794*)C))->_free/*16*/;
  704. int b2=_i;
  705. ((((T429*)C1))->_storage/*0*/)[(b2)-((((T429*)C1))->_lower/*12*/)]=(b1);
  706. }/*]*/
  707. C->_free=(_old_size)+(1);
  708. }
  709. T0*oBC672tmp_buckets=NULL;
  710. /*No:DICTIONARY[STRING,STRING].free*/
  711. void r794make(T794* C){
  712. C->_modulus=(2)*(32);
  713. {T226*n=malloc(sizeof(*n));
  714. *n=M226;
  715. r226make(n,(((T794*)C))->_modulus/*20*/);
  716. C->_buckets=(T0*)n;
  717. }
  718. {T429*n=malloc(sizeof(*n));
  719. *n=M429;
  720. r429make(n,1,32);
  721. C->_chain=(T0*)n;
  722. }
  723. {T52*n=malloc(sizeof(*n));
  724. *n=M52;
  725. r52make(n,1,32);
  726. C->_store=(T0*)n;
  727. }
  728. {T52*n=malloc(sizeof(*n));
  729. *n=M52;
  730. r52make(n,1,32);
  731. C->_keys=(T0*)n;
  732. }
  733. r794initialize(C);
  734. }
  735. void r794resize(T794* C,int a1){
  736. int _p=0;
  737. int _n=0;
  738. int _i=0;
  739. int _hash=0;
  740. r226copy(((T226*)(oBC672tmp_buckets)),(((T794*)C))->_buckets/*8*/);
  741. r226make(((T226*)((((T794*)C))->_buckets/*8*/)),a1);
  742. _i=0;
  743. while (!((_i)>=((((T794*)C))->_modulus/*20*/))) {
  744. _n=/*(IRF4.6item*/((((T226*)((T226*)(oBC672tmp_buckets))))->_storage/*0*/)[_i]/*)*/;
  745. while (!((_n)==(0))) {
  746. _p=r429item(((T429*)((((T794*)C))->_chain/*12*/)),_n);
  747. _hash=(r7hash_code(((T7*)(r52item(((T52*)((((T794*)C))->_keys/*0*/)),_n)))))%(a1);
  748. /*[IRF3.6put*/{T429* C1=((T429*)((((T794*)C))->_chain/*12*/));
  749. int b1=/*(IRF4.6item*/((((T226*)((T226*)((((T794*)C))->_buckets/*8*/))))->_storage/*0*/)[_hash]/*)*/;
  750. int b2=_n;
  751. ((((T429*)C1))->_storage/*0*/)[(b2)-((((T429*)C1))->_lower/*12*/)]=(b1);
  752. }/*]*/
  753. /*[IRF3.5put*/((((T226*)((T226*)((((T794*)C))->_buckets/*8*/))))->_storage/*0*/)[_hash]=(_n);
  754. /*]*/
  755. _n=_p;
  756. }
  757. _i=(_i)+(1);
  758. }
  759. C->_modulus=a1;
  760. C->_item_mem=0;
  761. }
  762. /*No:DICTIONARY[STRING,STRING].item_mem*/
  763. /*No:DICTIONARY[STRING,STRING].chain*/
  764. /*No:DICTIONARY[STRING,STRING].keys*/
  765. /*No:DICTIONARY[STRING,STRING].buckets*/
  766. int r794has(T794* C,T0* a1){
  767. int R=0;
  768. /*IF*/if ((((((T794*)C))->_has_mem/*24*/)==(0))||(!(r7is_equal(((T7*)a1),r52item(((T52*)((((T794*)C))->_keys/*0*/)),(((T794*)C))->_has_mem/*24*/))))) {
  769. C->_has_mem=/*(IRF4.6item*/((((T226*)((T226*)((((T794*)C))->_buckets/*8*/))))->_storage/*0*/)[(r7hash_code(((T7*)a1)))%((((T794*)C))->_modulus/*20*/)]/*)*/;
  770. while (!((((((T794*)C))->_has_mem/*24*/)==(0))||(r7is_equal(((T7*)a1),r52item(((T52*)((((T794*)C))->_keys/*0*/)),(((T794*)C))->_has_mem/*24*/))))) {
  771. C->_has_mem=r429item(((T429*)((((T794*)C))->_chain/*12*/)),(((T794*)C))->_has_mem/*24*/);
  772. }
  773. }
  774. /*FI*/R=((((T794*)C))->_has_mem/*24*/)!=(0);
  775. return R;
  776. }
  777. /*No:DICTIONARY[STRING,STRING].Min_size*/
  778. /*No:DICTIONARY[STRING,STRING].store*/
  779. void r794with_capacity(T794* C,int a1){
  780. int _i=0;
  781. _i=32;
  782. while (!((_i)>=(a1))) {
  783. _i=(2)*(_i);
  784. }
  785. C->_modulus=(2)*(_i);
  786. {T226*n=malloc(sizeof(*n));
  787. *n=M226;
  788. r226make(n,(((T794*)C))->_modulus/*20*/);
  789. C->_buckets=(T0*)n;
  790. }
  791. {T429*n=malloc(sizeof(*n));
  792. *n=M429;
  793. r429make(n,1,_i);
  794. C->_chain=(T0*)n;
  795. }
  796. {T52*n=malloc(sizeof(*n));
  797. *n=M52;
  798. r52make(n,1,_i);
  799. C->_store=(T0*)n;
  800. }
  801. {T52*n=malloc(sizeof(*n));
  802. *n=M52;
  803. r52make(n,1,_i);
  804. C->_keys=(T0*)n;
  805. }
  806. r794initialize(C);
  807. }
  808. void r794put(T794* C,T0* a1,T0* a2){
  809. int _hash=0;
  810. _hash=(r7hash_code(((T7*)a2)))%((((T794*)C))->_modulus/*20*/);
  811. /*IF*/if ((((((T794*)C))->_has_mem/*24*/)==(0))||(!(r7is_equal(((T7*)a2),r52item(((T52*)((((T794*)C))->_keys/*0*/)),(((T794*)C))->_has_mem/*24*/))))) {
  812. C->_has_mem=/*(IRF4.6item*/((((T226*)((T226*)((((T794*)C))->_buckets/*8*/))))->_storage/*0*/)[_hash]/*)*/;
  813. while (!((((((T794*)C))->_has_mem/*24*/)==(0))||(r7is_equal(((T7*)a2),r52item(((T52*)((((T794*)C))->_keys/*0*/)),(((T794*)C))->_has_mem/*24*/))))) {
  814. C->_has_mem=r429item(((T429*)((((T794*)C))->_chain/*12*/)),(((T794*)C))->_has_mem/*24*/);
  815. }
  816. /*IF*/if (((((T794*)C))->_has_mem/*24*/)==(0)) {
  817. /*IF*/if (((((T794*)C))->_count/*32*/)>=(r52count(((T52*)((((T794*)C))->_store/*4*/))))) {
  818. r794expand(C);
  819. }
  820. /*FI*//*[IRF3.6put*/{T52* C1=((T52*)((((T794*)C))->_keys/*0*/));
  821. T0* b1=a2;
  822. int b2=(((T794*)C))->_free/*16*/;
  823. ((((T52*)C1))->_storage/*0*/)[(b2)-((((T52*)C1))->_lower/*12*/)]=(b1);
  824. }/*]*/
  825. /*[IRF3.6put*/{T52* C1=((T52*)((((T794*)C))->_store/*4*/));
  826. T0* b1=a1;
  827. int b2=(((T794*)C))->_free/*16*/;
  828. ((((T52*)C1))->_storage/*0*/)[(b2)-((((T52*)C1))->_lower/*12*/)]=(b1);
  829. }/*]*/
  830. C->_has_mem=(((T794*)C))->_free/*16*/;
  831. C->_free=r429item(((T429*)((((T794*)C))->_chain/*12*/)),(((T794*)C))->_free/*16*/);
  832. /*[IRF3.6put*/{T429* C1=((T429*)((((T794*)C))->_chain/*12*/));
  833. int b1=/*(IRF4.6item*/((((T226*)((T226*)((((T794*)C))->_buckets/*8*/))))->_storage/*0*/)[_hash]/*)*/;
  834. int b2=(((T794*)C))->_has_mem/*24*/;
  835. ((((T429*)C1))->_storage/*0*/)[(b2)-((((T429*)C1))->_lower/*12*/)]=(b1);
  836. }/*]*/
  837. /*[IRF3.5put*/((((T226*)((T226*)((((T794*)C))->_buckets/*8*/))))->_storage/*0*/)[_hash]=((((T794*)C))->_has_mem/*24*/);
  838. /*]*/
  839. C->_count=((((T794*)C))->_count/*32*/)+(1);
  840. /*IF*/if (((((T794*)C))->_count/*32*/)>(((((T794*)C))->_modulus/*20*/)*(2))) {
  841. r794resize(C,(2)*((((T794*)C))->_modulus/*20*/));
  842. }
  843. /*FI*/}
  844. /*FI*/}
  845. else {
  846. /*[IRF3.6put*/{T52* C1=((T52*)((((T794*)C))->_store/*4*/));
  847. T0* b1=a1;
  848. int b2=(((T794*)C))->_has_mem/*24*/;
  849. ((((T52*)C1))->_storage/*0*/)[(b2)-((((T52*)C1))->_lower/*12*/)]=(b1);
  850. }/*]*/
  851. }
  852. /*FI*/C->_item_mem=0;
  853. }
  854. /*No:DICTIONARY[STRING,STRING].modulus*/
  855. /*No:DICTIONARY[STRING,STRING].count*/
  856. /*No:DICTIONARY[STRING,STRING].has_mem*/
  857. void r794initialize(T794* C){
  858. int _i=0;
  859. C->_count=0;
  860. C->_free=1;
  861. C->_has_mem=0;
  862. C->_item_mem=0;
  863. _i=1;
  864. while (!((_i)==(r429count(((T429*)((((T794*)C))->_chain/*12*/)))))) {
  865. /*[IRF3.6put*/{T429* C1=((T429*)((((T794*)C))->_chain/*12*/));
  866. int b1=(_i)+(1);
  867. int b2=_i;
  868. ((((T429*)C1))->_storage/*0*/)[(b2)-((((T429*)C1))->_lower/*12*/)]=(b1);
  869. }/*]*/
  870. _i=(_i)+(1);
  871. }
  872. /*[IRF3.6put*/{T429* C1=((T429*)((((T794*)C))->_chain/*12*/));
  873. int b1=0;
  874. int b2=_i;
  875. ((((T429*)C1))->_storage/*0*/)[(b2)-((((T429*)C1))->_lower/*12*/)]=(b1);
  876. }/*]*/
  877. _i=0;
  878. while (!((_i)>=((((T794*)C))->_modulus/*20*/))) {
  879. /*[IRF3.5put*/((((T226*)((T226*)((((T794*)C))->_buckets/*8*/))))->_storage/*0*/)[_i]=(0);
  880. /*]*/
  881. _i=(_i)+(1);
  882. }
  883. }
  884.  
  885.